package com.honghu.cloud.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.honghu.cloud.bean.Goods;
import com.honghu.cloud.common.dao.SupperDao;

public interface GoodsDao extends SupperDao {

	void batchDelete(List<Goods> objs);

	List<Goods> selectObjByProperty(Map<String, Object> maps);

	Goods selectByPrimaryKey(Long id);

	List<Goods> queryPageList(Map<String, Object> maps);

	Integer selectCount(Map<String, Object> maps);

	List<Goods> queryByIds(List<Long> ids);

	List<Goods> queryPageListByParentIsNull(Map<String, Object> params);

	void batchDeleteGoodsPhotos(Map<String, Object> params);

	void batchDeleteUserGoodsClass(Map<String, Object> params);

	void batchDeleteGoodsSpecProperty(Map<String, Object> params);
	
	void deleteGoodsMainPhoto(@Param(value="id")Long id);

	void delete(@Param(value="id")Long id);

	void update(Goods obj);

	List<Goods> queryGoodsByGoodsClassIds(Map<String, Object> params);

	void removeGoodsBrandByGoodsBrandId(Map<String, Object> params);
	
	void saveEntity(Goods obj);

	void updateById(Goods obj);

	void deleteById(@Param(value="id")Long id);

	void batchInsertGoodsPhotos(Map<String, Object> params);
	void batchInsertGoodsPhotoIds(Map<String, Object> params);

	void batchInsertGoodsSpecs(Map<String, Object> params);

	List<Goods> queryPages(Map<String,Object> params);
	//和queryPages一直，只不过不加在关联关系,这样可以加速访问
	List<Goods> queryPages2(Map<String,Object> params);
	
	void batchDeleteByIds(List<Long> ids);

	List<Goods> queryPagesWithNoRelations(Map<String,Object> params);

	List<Goods> queryPageListWithNoRelations(Map<String,Object> params);
	
	void batchInsertGoodsSpecs2(Map<String, Object> params);

	void saveGoodsUserGoodsClass(Map<String, Object> params);

	List<Map<String, Object>> queryGoodsList(Map<String, Object> params);

	Map<String, Object> selectGoodsById(Long id);

	List<Goods> queryPagesWithNoRelations2(Map<String, Object> params);
	
	void addUserLiveGoods(Map<String, Object> params);

	void addStoreAgentGoods(Map<String, Object> params);
	
	void delUserLiveGoods(Map<String, Object> params);

	void delStoreAgentGoods(Map<String, Object> params);
	
	Integer findUserLiveGoods(@Param(value="uid")Long uid, @Param(value="goods_id")Long goods_id);

	Integer findStoreAgentGoods(@Param(value="store_id")Long store_id, @Param(value="goods_id")Long goods_id);

	Map<String, Object> goodsStoreStatis(@Param(value="store_id")Long store_id);
	
	List<Goods> getRecommendGoods(@Param(value="ids")List<Long> ids);

	void deleteGoodsPhotosById(@Param(value="goods_id")Long goods_id);

	Integer selectSalenum(Map<String, Object> params);

	Integer goTravelCount(Map<String, Object> params);


	Integer offLineCount(Map<String, Object> params);


}
